﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cat.Domain.Caching
{
    public static class CachFactory
    {
        static CachFactory()
        {
            applicationCacheManager = new ApplicationCacheManager();
            memoryCacheManager = new MemoryCacheManager();
            perRequestCacheManager = new PerRequestCacheManager();
        }

        private static readonly ApplicationCacheManager applicationCacheManager;
        private static readonly MemoryCacheManager memoryCacheManager;
        private static readonly PerRequestCacheManager perRequestCacheManager;

        public static ICacheManager MemoryCache
        {
            get
            {
                return memoryCacheManager;
            }
        }

        public static ICacheManager PerRequestCache
        {
            get
            {
                return perRequestCacheManager;
            }
        }

        public static ICacheManager ApplicationCache
        {
            get
            {
                return applicationCacheManager;
            }
        }
    }
}
